home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / TP-TSR.ARJ / README < prev   
Text File  |  1989-02-11  |  8KB  |  154 lines

  1.  ═════════ Turbo 5.0/4.0 stay-resident demonstration package ══════════
  2.  
  3.    TP-TSR                 2/11/89                Richard W. Prescott
  4.  
  5.    This package illustrates a method for writing TP4/5 interrupt 
  6.    routines with sufficient power and flexibility to support 
  7.    sophisticated resident applications.  The interrupt hook and 
  8.    return procedures are written in assembly language, however the 
  9.    remainder of the application can be written entirely in Pascal, 
  10.    can use up to 64K stack, and can Chain or Return from Interrupt 
  11.    from any point in the Pascal Code.  All source code is provided, 
  12.    and all assembly source code is contained in the Units CONSOLE and 
  13.    DOS21_0A which are provided in both source and compiled form.  
  14.    Users without an assembler can redesign everything but the 
  15.    interrupt hook and return procedures.  
  16.  
  17.  
  18.    Files provided in this package:
  19.  
  20.    README         (This file)
  21.    DOS21_0A.PAS   Interrupt Unit (Pas/Asm Source)
  22.    DOS21_0A.TPU   Interrupt Unit (Compiled w Turbo Version 5.0)
  23.    DOS21_0A.TP4   Interrupt Unit (Compiled w Turbo Version 4.0)
  24.    CONSOLE.PAS    CRT-type Procedures & Functions (Pas/Asm Source)
  25.    CONSOLE.TPU    CRT-type Procedures & Functions (Compiled w Turbo 5)
  26.    CONSOLE.TPU    CRT-type Procedures & Functions (Compiled w Turbo 4)
  27.    CPATH.PAS      Simple resident program (Pascal Source)
  28.    CPATH.EXE      Simple resident program (Compiled)
  29.    CMDQ.PAS       Command editor program (Pascal Source)
  30.    CMDQ.EXE       Command editor program (Compiled)
  31.  
  32.  
  33.    The sample interrupt Unit provided installs an interrupt handler 
  34.    for the DOS function 0Ah (Buffered Input), which is the function 
  35.    used by COMMAND.COM and DEBUG.COM to request keyboard input.  
  36.    Routines are provided to return (IRET) to the calling program or 
  37.    to Chain to the next program in the interrupt chain.  These 
  38.    routines can be invoked from any point in the service routine.  
  39.    Simple and obvious modifications can be made to the interrupt unit 
  40.    to create handlers for other functions and/or interrupts.  
  41.  
  42.    The programs CPATH and CMDQ provide concrete examples of resident 
  43.    programs using the DOS21_0A Interrupt Unit.  CPATH is the shortest 
  44.    program I could think of which nonetheless uses the interrupt unit 
  45.    to do something at least slightly useful.  It checks the current 
  46.    disk drive, and if it is 'C' or greater, writes the current 
  47.    directory path (e.g.  C:\TURBO> ) before chaining to the original 
  48.    interrupt routine to service the input request.  The advantage 
  49.    over the $p $g method described on p595 of the Turbo 4.0 Owner's 
  50.    Handbook and on p317 of the Turbo 5.0 User's Guide is that CPATH 
  51.    does not cause the noticable pause between each DOS command when 
  52.    the active drive is a floppy disk drive.  It assumes that most 
  53.    users do not use subdirectories on their floppy disks.  
  54.  
  55.    CMDQ is a more ambitious undertaking which provides all the 
  56.    features of a basic command line editor with command recall.  It 
  57.    is written in a modular fashion and is heavily commented so that 
  58.    you may easily customize it to your liking.  The basic edit key 
  59.    configuration is compatible with CED by Chris Dunford and NDOSEDIT 
  60.    by Jack Gersbach:  use the Up Arrow to move back through previous 
  61.    commands, and Down Arrow to move forward again.  While any command 
  62.    is displayed, use Home, End, Left, Right, Ctrl Left, and Ctrl 
  63.    Right to move around, and Esc, Ctrl Home, Ctrl End, Backspace, and 
  64.    Delete to delete all or part of a line.  Insert toggles between 
  65.    insert and overwrite mode, and Enter, from any position on the 
  66.    line, executes the command.  Refer to the comments in CMDQ.PAS for 
  67.    a further description of what each key does.  
  68.  
  69.    Note that neither CPATH nor CMDQ could be written using the built-
  70.    in "Interrupt Procedure" provided in Turbo version 4/5, since it 
  71.    does not provide for chaining to the previous interrupt vector.  
  72.  
  73.    For those interested in designing interrupt units for other 
  74.    applications, two features of the present unit are worth noting.  
  75.    First, since it is impossible for DOS to be active at the time of 
  76.    the interrupt which results in a call to our Pascal code, we can 
  77.    make full use of DOS functions (including WRITELN, FindFirst, etc) 
  78.    within the Pascal code of the service routine.  Handlers for 
  79.    interrupts other than $21 must either insure that DOS is not 
  80.    active when they "wake up", or avoid using DOS function calls 
  81.    within the handler.  Second, since these programs are active at 
  82.    EVERY function 0A request, there is no need for a separate 
  83.    Interrupt $16 or $09 routine to check for a "Hot Key".  Programs 
  84.    which do install more than one interrupt handler must provide a 
  85.    separate stack area for each handler, or use the caller's stack.  
  86.  
  87.    The Units CONSOLE and DOS21_0A were compiled and assembled using 
  88.    Turbo Pascal Version 5.0 and TP&Asm Version 2 ß.  TP&Asm provides 
  89.    an integrated compile-time assembler within the Turbo development 
  90.    environment (and the command line compiler TPC).  The result is an 
  91.    ASSEMBLY Development Environment which is identical to your PASCAL 
  92.    Development Environment, and which allows you to mix assembly 
  93.    language sections freely within your Pascal code and to make 
  94.    simplified assembly references to all Pascal variables.  It 
  95.    provides fast assembly with no additional disk access, and reports 
  96.    assembly syntax errors on the standard Turbo error line with 
  97.    cursor placed on the error.  It accepts the standard syntax of 
  98.    both MASM and A86, but also provides certain enhancements such as 
  99.    the placement of named data in the Code Segment which is used in 
  100.    the interrupt unit DOS21_0A.  
  101.  
  102.    TP&Asm Version 2.0 will be available from me for $49 plus $3 P&H.  
  103.    The current Beta Test Version 2 ß is available now for $39 plus $3 
  104.    P&H, with a free upgrade to 2.0 when it becomes available.  
  105.  
  106.    A sharable Memory Mode version called TP&Asm-M is also available.  
  107.    TP&Asm-M provides the same assembly language capabilities as TPA, 
  108.    but is intended only for assembly language development within the 
  109.    Turbo 4.0 or 5.0 integrated environments, and therefore does not 
  110.    have the capability of compiling to disk.  (You can of course read 
  111.    and save Pascal and Assembly SOURCE files with both programs).  
  112.  
  113.    The TP&Asm-M distribution disk can be ordered from me for $5 plus 
  114.    $3 P&H, with the $5 being credited toward subsequent registration 
  115.    of TP&Asm or TP&Asm-M.  It can also be downloaded from the IBMPRO 
  116.    or BPROGA forums on CompUServe.  Look for TPA2-A.ARC and TPA2-R.ARC.
  117.  
  118.  
  119.    To order TP&Asm, please send a check or money order payable to:
  120.  
  121.                          Richard W. Prescott
  122.                          724 Sauk Ridge Trail
  123.                          Madison, WI  53705
  124.  
  125.    Please include the following information:
  126.  
  127.    1. Full Version number of the Turbo Pascal compiler you now use.
  128.  
  129.    2. Your registration number for that compiler.
  130.  
  131.    3. If you obtained TP&Asm-M from a bulletin board:
  132.       3a. Area code and phone number of that bulletin board
  133.       3b. Full Version number of the TP&Asm-M version you have
  134.       3c. Directory Date of the README file
  135.  
  136.  
  137.    The source and compiled code in this package is copyrighted as 
  138.    indicated.  You may share this package and/or upload it to 
  139.    bulletin boards as long as no fee is charged.  You may of course 
  140.    make modifications to these programs for your own use, and you may 
  141.    distribute these modifications with the package.  The original 
  142.    unmodified files must all be present.  
  143.  
  144.    Registered owners of TP&Asm may distribute programs using any of 
  145.    the source code or compiled units in this package in original or 
  146.    modified form.  Please give appropriate credit.  
  147.  
  148.    If you distribute programs written using TP&Asm, please help me 
  149.    spread the word by including a statement like the following: 
  150.  
  151.           This program was compiled and assembled using 
  152.          Turbo Pascal Version xxx and TP&Asm Version yyy.  
  153.  
  154.